<%-- 
    Document   : parametros_compra
    Created on : Jan 4, 2013, 11:23:58 AM
    Author     : Mario
--%>

<%@page import="CapaLogica.Region"%>
<%@page import="CapaLogica.Categoria"%>
<%@page import="java.util.LinkedList"%>
<%@page import="recursos.interfaz_com"%>
<%@page import="javax.swing.JComboBox"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">


<%

    interfaz_com com = new interfaz_com();
    LinkedList<Region> lista = com.pedir_region();
%>



<h2>Definir Parametros Shipping</h2>
<form>
    Nombre Shipping: <input type="text" name="nombre_shipping" size="20">
    <br>
    <br>
    Tipo: <%

        out.print("<SELECT name=\"tipo_shipping\" SIZE=1>");
        out.print("<OPTION value=\"tipo1\"> tipo1 </OPTION>");
        out.print("<OPTION value=\"tipo2\"> tipo2 </OPTION>");
        out.print("<OPTION value=\"tipo3\"> tipo3 </OPTION>");
        out.print("</SELECT>");


    %>
    <br>
    <br>
    Tipo Pago: <%
        out.print("<SELECT name=\"tipo_pago\" SIZE=1>");
        out.print("<OPTION value=\"1\"> BanUrbal </OPTION>");
        out.print("<OPTION value=\"2\"> Pago Amigo </OPTION>");
        out.print("</SELECT>");
    %>
    <br>
    <br>            
    Region: <%

        out.print("<SELECT name=\"region\" SIZE=1>");
        for (Region tipo : lista) {
            out.print("<OPTION value=\" " + tipo.getIdRegion() + " \"> " + tipo.getNombre() + "</OPTION>");
        }
        out.print("</SELECT>");

    %>
    <br>
    <br>
    Total (+ Shipping): <%
        double s = (Double) session.getAttribute("costo_total") + 10.00;
        out.print(s);
    %>
    <br>
    <br>
    <button type="button" onclick="Ejecutar2(this.form)">generar compra</button>
</form>
